package pojo;

public class Student {
    private Integer sno;
    private String sname;
    private String sex;
    private Integer age;
    private Integer gno;
//为了体现学生和班级的关系，添加班级类
    private Grade grade;
    private String psw;
    public Student() {
    }



    public Student(Integer sno, String sname, String sex, Integer age, Integer gno) {
        this.sno = sno;
        this.sname = sname;
        this.sex = sex;
        this.age = age;
        this.gno = gno;
    }

    public Student(Integer sno, String sname, String sex, Integer age, Integer gno, Grade grade) {
        this.sno = sno;
        this.sname = sname;
        this.sex = sex;
        this.age = age;
        this.gno = gno;
        this.grade = grade;
    }

    public Student(Integer sno, String sname, String sex, Integer age, Integer gno, String psw) {
        this.sno = sno;
        this.sname = sname;
        this.sex = sex;
        this.age = age;
        this.gno = gno;

        this.psw = psw;
    }

    public Integer getSno() {
        return sno;
    }

    public void setSno(Integer sno) {
        this.sno = sno;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getGno() {
        return gno;
    }

    public void setGno(Integer gno) {
        this.gno = gno;
    }
    public Grade getGrade() {
        return grade;
    }

    public void setGrade(Grade grade) {
        this.grade = grade;
    }

    public String getPsw() {
        return psw;
    }

    public void setPsw(String psw) {
        this.psw = psw;
    }

    @Override
    public String toString() {
        return "Student{" +
                "sno=" + sno +
                ", sname='" + sname + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                ", gno=" + gno +
                ", grade=" + grade +
                ", psw='" + psw + '\'' +
                '}';
    }
}
